package com.rockcent.mall.lib.dto;

import com.rockcent.common.domain.DtoEntity;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by yflh on 16/7/27.
 */
public class  MerchantCouponDto extends DtoEntity {

    /**
     * 类型 VOUCHERS(\"抵用券\"), DISCOUNT(\"折扣券\")'")
     */
    private String type;


    public static final String PERFIX_DOWNLOAD_QRCODE = "coupon_qrcode_download_";

    /**
     * ID 集合
     */
    private List<Long> ids;
    /**
     * 名称
     */
    private String name;

    /**
     * 唯一编号
     */
    private String barCode;
    /**
     * 面值(抵用券)
     */
    private BigDecimal faceValue;

    /**
     * 享受折扣(折扣券)
     */
    private BigDecimal discount;
    /**
     * 最低消费金额
     */
    private Double limitAmount;
    /**
     * 发放数量
     */
    private Long quantity;

    /**
     * 二维码URL
     */
    private String promoteUrl;

    /**
     * 推广URL
     */
    private String sendOutUrl;
    /**
     * 有效期开始时间
     */
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateEnabled;
    /**
     * 有效期结束时间
     */
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateDisabled;
    /**
     * '适用范围 ALL_STORE(\"所有门店\"), ALL_PRODUCT(\"所有产品\"), PART_STORE(\"指定门店\"), PART_PRODUCT(\"指定产品\")'")
     */
    private String useScope;
    /**
     * 发放时间
     */
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateIssued;

    /**
     * 领取限制 NO(\"没有上限\"), ALL(\"总共上限\"), DAYS(\"每天上限\")'"
     */
    private String drawLimit;

    /**
     * 限制数量
     */
    private Long limitCount=1l;
    /**
     * 是否共享 YES(\"是\"), NO(\"否\")'"
     */
    private String sharing;

    /**
     * 是否发布到领券中心 YES(\"是\"), NO(\"否\")'")
     */
    private String showOnCenter;
    /**
     * 是否发布到店铺首页 YES(\"是\"), NO(\"否\")
     **/
    private String showOnMerchant;

    /**
     * LOGO图
     */
    private String logoUrl;

    /**
     * '使用说明
     */
    private String introduction;

    /**
     * 状态 WAIT_ISSUE(\"待发放\"), ISSUED(\"已发放\"), SOLDOUT(\"已下架\"), EXPIRED(\"已过期\"), DELETED(\"已删除\")'")
     */
    private String status;

    /**
     * 商家ID
     */
    private Long merchantId;

    /**
     * 排序字段
     */
    private String orderFieldName;

    /**
     * 是否降序 true 降序 false 升序
     */
    private String isDesc;

    /**
     * 是否线上使用
     */
    private String isOnLine;

    /**
     * 商家名称
     */
    private String merchantName;

    /**
     * 剩余数量
     */
    private Long leaveTotal;

    /**
     * 核销数
     */
    private Long verifiedCount=0l;

    /**
     * 部分产品ID
     * @return
     */
    private String productList;
    /**
     * 用户是否已经领取
     */
    private Boolean hadToken = false;

    //领取数
    private  Long sendTotal;

    /**
     * 卡卷适用门店总数
     */
    private Long couponStoreCount = 0L;

    /**
     * 卡卷适用产品总数
     */
    private Long couponProductCount = 0L;

    /**
     * 冻结数量
     */
    private Long quantityFrozen=0l;

    /**
     * 已使用数量
     */
    private Long quantityUsed=0l;

    /**
     * 领卷来源 COUPON_CENTER("领券中心"), GIFT_PACKET("礼包"), 商家店铺("已下架"), RED_PACKET("红包"), PROMOTE("二维码推广")'")
     */
    private String source;

    /**
     * 所属客户卡卷ID
     */
    private Long customerCouponId;

    /**
     * 购买产品总价
     */
    private String productPrice;

    /**
     * 积分兑换
     */
    private String integration;

    /**
     * 审核意见
     */
    private String remark;

    /**
     * 审核时间
     */
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String auditTime;

    /**
     * 积分渠道ID
     */
    private Long channelId;

    /**
     * 积分渠道名称
     */
    private String channelName;

    /**
     * 适用产品数量
     */
    private int productCount;

    /**
     * 适用门店数量
     */
    private int storeCount;
    /**
     * 部分门店ID
     */
    private String storeList;

    /**
     * 是否可以停止发放
     */
    private int canStop;
    /**
     * 是否可以投放渠道
     */
    private int canPut;
    /**
     * 投放批次号
     */
    private Long batchPutNo;

    /**
     * 最优惠
     */
    private String mostFavorable;

    private String integrationStatus;

    public Long getSendTotal() {
        return sendTotal;
    }

    public void setSendTotal(Long sendTotal) {
        this.sendTotal = sendTotal;
    }

    public Boolean getHadToken() {
        return hadToken;
    }

    public void setHadToken(Boolean hadToken) {
        this.hadToken = hadToken;
    }



    public String getProductList() {
        return productList;
    }

    public void setProductList(String productList) {
        this.productList = productList;
    }

    public String getStoreList() {

        return storeList;
    }

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }

    public Long getCouponProductCount() {
        return couponProductCount;
    }

    public void setCouponProductCount(Long couponProductCount) {
        this.couponProductCount = couponProductCount;
    }

    public void setStoreList(String storeList) {
        this.storeList = storeList;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public Long getVerifiedCount() {
        return verifiedCount;
    }

    public void setVerifiedCount(Long verifiedCount) {
        this.verifiedCount = verifiedCount;
    }

    public Long getLeaveTotal() {
        return leaveTotal;
    }

    public void setLeaveTotal(Long leaveTotal) {
        this.leaveTotal = leaveTotal;
    }

    public String getSendOutUrl() {
        return sendOutUrl;
    }

    public void setSendOutUrl(String sendOutUrl) {
        this.sendOutUrl = sendOutUrl;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getPromoteUrl() {
        return promoteUrl;
    }

    public void setPromoteUrl(String promoteUrl) {
        this.promoteUrl = promoteUrl;
    }

    public String getIsOnLine() {

        return isOnLine;

    }

    public void setIsOnLine(String isOnLine) {
        this.isOnLine = isOnLine;
    }

    public String getOrderFieldName() {
        return orderFieldName;
    }

    public void setOrderFieldName(String orderFieldName) {
        this.orderFieldName = orderFieldName;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public String getIsDesc() {
        return isDesc;
    }

    public void setIsDesc(String isDesc) {
        this.isDesc = isDesc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getFaceValue() {
        return faceValue;
    }

    public void setFaceValue(BigDecimal faceValue) {
        this.faceValue = faceValue;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public Double getLimitAmount() {
        return limitAmount;
    }

    public void setLimitAmount(Double limitAmount) {
        this.limitAmount = limitAmount;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public Date getDateEnabled() {
        return dateEnabled;
    }

    public void setDateEnabled(Date dateEnabled) {
        this.dateEnabled = dateEnabled;
    }

    public Date getDateDisabled() {
        return dateDisabled;
    }

    public void setDateDisabled(Date dateDisabled) {
        this.dateDisabled = dateDisabled;
    }

    public String getUseScope() {
        return useScope;
    }

    public void setUseScope(String useScope) {
        this.useScope = useScope;
    }

    public Date getDateIssued() {
        return dateIssued;
    }

    public void setDateIssued(Date dateIssued) {
        this.dateIssued = dateIssued;
    }

    public String getDrawLimit() {
        return drawLimit;
    }

    public void setDrawLimit(String drawLimit) {
        this.drawLimit = drawLimit;
    }

    public Long getLimitCount() {
        return limitCount;
    }

    public void setLimitCount(Long limitCount) {
        this.limitCount = limitCount;
    }

    public String getSharing() {
        return sharing;
    }

    public void setSharing(String sharing) {
        this.sharing = sharing;
    }

    public String getShowOnCenter() {
        return showOnCenter;
    }

    public void setShowOnCenter(String showOnCenter) {
        this.showOnCenter = showOnCenter;
    }

    public String getShowOnMerchant() {
        return showOnMerchant;
    }

    public void setShowOnMerchant(String showOnMerchant) {
        this.showOnMerchant = showOnMerchant;
    }

    public String getLogoUrl() {
        return logoUrl;
    }

    public void setLogoUrl(String logoUrl) {
        this.logoUrl = logoUrl;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getStatus() {
        return status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getCouponStoreCount() {
        return couponStoreCount;
    }

    public Long getQuantityFrozen() {
        return quantityFrozen;
    }

    public void setQuantityFrozen(Long quantityFrozen) {
        this.quantityFrozen = quantityFrozen;
    }

    public Long getQuantityUsed() {
        return quantityUsed;
    }

    public void setQuantityUsed(Long quantityUsed) {
        this.quantityUsed = quantityUsed;
    }

    public void setCouponStoreCount(Long couponStoreCount) {
        this.couponStoreCount = couponStoreCount;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Long getCustomerCouponId() {
        return customerCouponId;
    }

    public void setCustomerCouponId(Long customerCouponId) {
        this.customerCouponId = customerCouponId;
    }

    public String getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(String productPrice) {
        this.productPrice = productPrice;
    }
    public String getIntegration() {
        return integration;
    }

    public void setIntegration(String integration) {
        this.integration = integration;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(String auditTime) {
        this.auditTime = auditTime;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public int getProductCount() {
        return productCount;
    }

    public void setProductCount(int productCount) {
        this.productCount = productCount;
    }

    public int getStoreCount() {
        return storeCount;
    }

    public void setStoreCount(int storeCount) {
        this.storeCount = storeCount;
    }

    public static String getPerfixDownloadQrcode() {
        return PERFIX_DOWNLOAD_QRCODE;
    }

    public int getCanStop() {
        return canStop;
    }

    public void setCanStop(int canStop) {
        this.canStop = canStop;
    }

    public int getCanPut() {
        return canPut;
    }

    public void setCanPut(int canPut) {
        this.canPut = canPut;
    }

    public Long getBatchPutNo() {
        return batchPutNo;
    }

    public void setBatchPutNo(Long batchPutNo) {
        this.batchPutNo = batchPutNo;
    }

    public String getMostFavorable() {
        return mostFavorable;
    }

    public void setMostFavorable(String mostFavorable) {
        this.mostFavorable = mostFavorable;
    }

    public String getIntegrationStatus() {
        return integrationStatus;
    }

    public void setIntegrationStatus(String integrationStatus) {
        this.integrationStatus = integrationStatus;
    }

    @Override
    public String toString() {
        return "MerchantCouponDto{" +
                "type='" + type + '\'' +
                ", ids=" + ids +
                ", name='" + name + '\'' +
                ", barCode='" + barCode + '\'' +
                ", faceValue=" + faceValue +
                ", discount=" + discount +
                ", limitAmount=" + limitAmount +
                ", quantity=" + quantity +
                ", promoteUrl='" + promoteUrl + '\'' +
                ", sendOutUrl='" + sendOutUrl + '\'' +
                ", dateEnabled='" + dateEnabled + '\'' +
                ", dateDisabled='" + dateDisabled + '\'' +
                ", useScope='" + useScope + '\'' +
                ", dateIssued=" + dateIssued +
                ", drawLimit='" + drawLimit + '\'' +
                ", limitCount=" + limitCount +
                ", sharing='" + sharing + '\'' +
                ", showOnCenter='" + showOnCenter + '\'' +
                ", showOnMerchant='" + showOnMerchant + '\'' +
                ", logoUrl='" + logoUrl + '\'' +
                ", introduction='" + introduction + '\'' +
                ", status='" + status + '\'' +
                ", merchantId=" + merchantId +
                ", orderFieldName='" + orderFieldName + '\'' +
                ", isDesc='" + isDesc + '\'' +
                ", isOnLine='" + isOnLine + '\'' +
                ", merchantName='" + merchantName + '\'' +
                ", leaveTotal=" + leaveTotal +
                ", verifiedCount=" + verifiedCount +
                ", productList='" + productList + '\'' +
                ", hadToken=" + hadToken +
                ", sendTotal=" + sendTotal +
                ", couponStoreCount=" + couponStoreCount +
                ", couponProductCount=" + couponProductCount +
                ", quantityFrozen=" + quantityFrozen +
                ", quantityUsed=" + quantityUsed +
                ", source='" + source + '\'' +
                ", customerCouponId=" + customerCouponId +
                ", productPrice='" + productPrice + '\'' +
                ", integration='" + integration + '\'' +
                ", remark='" + remark + '\'' +
                ", auditTime='" + auditTime + '\'' +
                ", channelId=" + channelId +
                ", channelName='" + channelName + '\'' +
                ", productCount=" + productCount +
                ", storeCount=" + storeCount +
                ", storeList='" + storeList + '\'' +
                ", canStop=" + canStop +
                ", canPut=" + canPut +
                ", batchPutNo=" + batchPutNo +
                ", mostFavorable='" + mostFavorable + '\'' +
                ", integrationStatus='" + integrationStatus + '\'' +
                '}';
    }
}
